﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NBusiness.Data.Providers.SqlServer.Query;

namespace NBusiness.Query.Testing
{
    [TestClass]
    class SqlTableTests
    {
        [TestMethod]
        public void TableTest_AndOperator()
        {
            ISelect select = new SqlTable("A") & new SqlColumn("C").Equal("@P");

            string expected = "SELECT * FROM [A] AS [B] WHERE ([C]=@P)";
            string actual = select.ToSql();

            Assert.AreEqual(expected, actual);
        }
    }
}
